// 用户有关操作
import {request} from "@/network/request";

export function login(param) {
    return request({
        url: `/login/cellphone?phone=${param.phone}&password=${param.password}`
    })
}

// 用户信息
export function getUserAccount(timestamp) {
    return request({
        url: `/user/account?timestamp=${timestamp}`
    })
}

// 获取用户收藏的歌单，电台等数量信息
export function getUserSubCount() {
    return request({
        url: '/user/subcount'
    })
}

// 用户详情
export function getUserDetail(uid) {
    return request({
        url: `/user/detail?uid=${uid}`
    })
}

// 退出登录
export function logout() {
    return request({
        url: '/logout'
    })
}

// 获取登录状态
export function getLoginStatus(cookie) {
    return request({
        url: `/login/status?cookie=${cookie}`
    })
}

// 更新用户信息
export function updateUserInfo(gender, signature, city, nickname, birthday, province) {
    return request({
        url: `/user/update?gender=${gender}&signature=${signature}&city=${city}&nickname=${nickname}&birthday=${birthday}&province=${province}`
    })
}